var overall = 
{ Name: "ESG Risk Rating", Level2: [
    { Name: "Overall ESG Risk Rating", Level3: [
		{ Name: "ESG Risk Rating Rank", Level4: [{ Name: "ESG Risk Rank-Industry", CriteriaEntityField: "ESG Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },	
		{ Name: "ESG Risk Rating Rank", Level4: [{ Name: "ESG Risk Rank-Subindustry", CriteriaEntityField: "ESG Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "ESG Risk Rating Percentile", Level4: [{ Name: "ESG Risk Percentile-Universe", CriteriaEntityField: "ESG Risk Percentile-Universe", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "ESG Risk Rating Percentile", Level4: [{ Name: "ESG Risk Percentile-Industry", CriteriaEntityField: "ESG Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "ESG Risk Rating Percentile", Level4: [{ Name: "ESG Risk Percentile-Subindustry", CriteriaEntityField: "ESG Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] }
    ]}
]};

var mei = 
{ Name: "ESG Risk Rating", Level2: [
    { Name: "Material E&S Issues", Level3: [
		{ Name: "Risk Rank", Category:"Access to Basic Services" ,Level4: [{ Name: "Issue - Access to Basic Services-Risk Rank-Universe", CriteriaEntityField:  "Issue - Access to Basic Services-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Bribery and Corruption" ,Level4: [{ Name: "Issue - Bribery and Corruption-Risk Rank-Universe", CriteriaEntityField:  "Issue - Bribery and Corruption-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Business Ethics" ,Level4: [{ Name: "Issue - Business Ethics-Risk Rank-Universe", CriteriaEntityField:  "Issue - Business Ethics-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Carbon - Own Operations" ,Level4: [{ Name: "Issue - Carbon - Own Operations-Risk Rank-Universe", CriteriaEntityField:  "Issue - Carbon - Own Operations-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Carbon - Products and Services" ,Level4: [{ Name: "Issue - Carbon - Products and Services-Risk Rank-Universe", CriteriaEntityField:  "Issue - Carbon - Products and Services-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Community Relations" ,Level4: [{ Name: "Issue - Community Relations-Risk Rank-Universe", CriteriaEntityField:  "Issue - Community Relations-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Data Privacy and Security" ,Level4: [{ Name: "Issue - Data Privacy and Security-Risk Rank-Universe", CriteriaEntityField:  "Issue - Data Privacy and Security-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"E&S Impact of Products and Services" ,Level4: [{ Name: "Issue - E&S Impact of Products and Services-Risk Rank-Universe", CriteriaEntityField:  "Issue - E&S Impact of Products and Services-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"ESG Integration - Financials" ,Level4: [{ Name: "Issue - ESG Integration - Financials-Risk Rank-Universe", CriteriaEntityField:  "Issue - ESG Integration - Financials-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Emissions, Effluents and Waste" ,Level4: [{ Name: "Issue - Emissions, Effluents and Waste-Risk Rank-Universe", CriteriaEntityField:  "Issue - Emissions, Effluents and Waste-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Capital" ,Level4: [{ Name: "Issue - Human Capital-Risk Rank-Universe", CriteriaEntityField:  "Issue - Human Capital-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Rights" ,Level4: [{ Name: "Issue - Human Rights-Risk Rank-Universe", CriteriaEntityField:  "Issue - Human Rights-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Rights - Supply Chain" ,Level4: [{ Name: "Issue - Human Rights - Supply Chain-Risk Rank-Universe", CriteriaEntityField:  "Issue - Human Rights - Supply Chain-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Land Use and Biodiversity" ,Level4: [{ Name: "Issue - Land Use and Biodiversity-Risk Rank-Universe", CriteriaEntityField:  "Issue - Land Use and Biodiversity-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Land Use and Biodiversity - Supply Chain" ,Level4: [{ Name: "Issue - Land Use and Biodiversity - Supply Chain-Risk Rank-Universe", CriteriaEntityField:  "Issue - Land Use and Biodiversity - Supply Chain-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Occupational Health and Safety" ,Level4: [{ Name: "Issue - Occupational Health and Safety-Risk Rank-Universe", CriteriaEntityField:  "Issue - Occupational Health and Safety-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Product Governance" ,Level4: [{ Name: "Issue - Product Governance-Risk Rank-Universe", CriteriaEntityField:  "Issue - Product Governance-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resilience" ,Level4: [{ Name: "Issue - Resilience-Risk Rank-Universe", CriteriaEntityField:  "Issue - Resilience-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resource Use" ,Level4: [{ Name: "Issue - Resource Use-Risk Rank-Universe", CriteriaEntityField:  "Issue - Resource Use-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resource Use - Supply Chain" ,Level4: [{ Name: "Issue - Resource Use - Supply Chain-Risk Rank-Universe", CriteriaEntityField:  "Issue - Resource Use - Supply Chain-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Access to Basic Services" ,Level4: [{ Name: "Issue - Access to Basic Services-Risk Rank-Industry", CriteriaEntityField:  "Issue - Access to Basic Services-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Bribery and Corruption" ,Level4: [{ Name: "Issue - Bribery and Corruption-Risk Rank-Industry", CriteriaEntityField:  "Issue - Bribery and Corruption-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Business Ethics" ,Level4: [{ Name: "Issue - Business Ethics-Risk Rank-Industry", CriteriaEntityField:  "Issue - Business Ethics-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Carbon - Own Operations" ,Level4: [{ Name: "Issue - Carbon - Own Operations-Risk Rank-Industry", CriteriaEntityField:  "Issue - Carbon - Own Operations-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Carbon - Products and Services" ,Level4: [{ Name: "Issue - Carbon - Products and Services-Risk Rank-Industry", CriteriaEntityField:  "Issue - Carbon - Products and Services-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Community Relations" ,Level4: [{ Name: "Issue - Community Relations-Risk Rank-Industry", CriteriaEntityField:  "Issue - Community Relations-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Data Privacy and Security" ,Level4: [{ Name: "Issue - Data Privacy and Security-Risk Rank-Industry", CriteriaEntityField:  "Issue - Data Privacy and Security-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"E&S Impact of Products and Services" ,Level4: [{ Name: "Issue - E&S Impact of Products and Services-Risk Rank-Industry", CriteriaEntityField:  "Issue - E&S Impact of Products and Services-Risk Rank-Industry  Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"ESG Integration - Financials" ,Level4: [{ Name: "Issue - ESG Integration - Financials-Risk Rank-Industry", CriteriaEntityField:  "Issue - ESG Integration - Financials-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Emissions, Effluents and Waste" ,Level4: [{ Name: "Issue - Emissions, Effluents and Waste-Risk Rank-Industry", CriteriaEntityField:  "Issue - Emissions, Effluents and Waste-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Capital" ,Level4: [{ Name: "Issue - Human Capital-Risk Rank-Industry", CriteriaEntityField:  "Issue - Human Capital-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Rights" ,Level4: [{ Name: "Issue - Human Rights-Risk Rank-Industry", CriteriaEntityField:  "Issue - Human Rights-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Rights - Supply Chain" ,Level4: [{ Name: "Issue - Human Rights - Supply Chain-Risk Rank-Industry", CriteriaEntityField:  "Issue - Human Rights - Supply Chain-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Land Use and Biodiversity" ,Level4: [{ Name: "Issue - Land Use and Biodiversity-Risk Rank-Industry", CriteriaEntityField:  "Issue - Land Use and Biodiversity-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Land Use and Biodiversity - Supply Chain" ,Level4: [{ Name: "Issue - Land Use and Biodiversity - Supply Chain-Risk Rank-Industry", CriteriaEntityField:  "Issue - Land Use and Biodiversity - Supply Chain-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Occupational Health and Safety" ,Level4: [{ Name: "Issue - Occupational Health and Safety-Risk Rank-Industry", CriteriaEntityField:  "Issue - Occupational Health and Safety-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Product Governance" ,Level4: [{ Name: "Issue - Product Governance-Risk Rank-Industry", CriteriaEntityField:  "Issue - Product Governance-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resilience" ,Level4: [{ Name: "Issue - Resilience-Risk Rank-Industry", CriteriaEntityField:  "Issue - Resilience-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resource Use" ,Level4: [{ Name: "Issue - Resource Use-Risk Rank-Industry", CriteriaEntityField:  "Issue - Resource Use-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resource Use - Supply Chain" ,Level4: [{ Name: "Issue - Resource Use - Supply Chain-Risk Rank-Industry", CriteriaEntityField:  "Issue - Resource Use - Supply Chain-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Access to Basic Services" ,Level4: [{ Name: "Issue - Access to Basic Services-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Access to Basic Services-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Bribery and Corruption" ,Level4: [{ Name: "Issue - Bribery and Corruption-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Bribery and Corruption-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Business Ethics" ,Level4: [{ Name: "Issue - Business Ethics-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Business Ethics-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Carbon - Own Operations" ,Level4: [{ Name: "Issue - Carbon - Own Operations-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Carbon - Own Operations-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Carbon - Products and Services" ,Level4: [{ Name: "Issue - Carbon - Products and Services-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Carbon - Products and Services-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Community Relations" ,Level4: [{ Name: "Issue - Community Relations-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Community Relations-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Data Privacy and Security" ,Level4: [{ Name: "Issue - Data Privacy and Security-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Data Privacy and Security-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"E&S Impact of Products and Services" ,Level4: [{ Name: "Issue - E&S Impact of Products and Services-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - E&S Impact of Products and Services-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"ESG Integration - Financials" ,Level4: [{ Name: "Issue - ESG Integration - Financials-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - ESG Integration - Financials-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Emissions, Effluents and Waste" ,Level4: [{ Name: "Issue - Emissions, Effluents and Waste-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Emissions, Effluents and Waste-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Capital" ,Level4: [{ Name: "Issue - Human Capital-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Human Capital-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Rights" ,Level4: [{ Name: "Issue - Human Rights-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Human Rights-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Human Rights - Supply Chain" ,Level4: [{ Name: "Issue - Human Rights - Supply Chain-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Human Rights - Supply Chain-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Land Use and Biodiversity" ,Level4: [{ Name: "Issue - Land Use and Biodiversity-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Land Use and Biodiversity-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Land Use and Biodiversity - Supply Chain" ,Level4: [{ Name: "Issue - Land Use and Biodiversity - Supply Chain-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Land Use and Biodiversity - Supply Chain-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Occupational Health and Safety" ,Level4: [{ Name: "Issue - Occupational Health and Safety-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Occupational Health and Safety-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Product Governance" ,Level4: [{ Name: "Issue - Product Governance-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Product Governance-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resilience" ,Level4: [{ Name: "Issue - Resilience-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Resilience-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resource Use" ,Level4: [{ Name: "Issue - Resource Use-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Resource Use-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Rank", Category:"Resource Use - Supply Chain" ,Level4: [{ Name: "Issue - Resource Use - Supply Chain-Risk Rank-Subindustry", CriteriaEntityField:  "Issue - Resource Use - Supply Chain-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Access to Basic Services" ,Level4: [{ Name: "Issue - Access to Basic Services-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Access to Basic Services-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Bribery and Corruption" ,Level4: [{ Name: "Issue - Bribery and Corruption-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Bribery and Corruption-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Business Ethics" ,Level4: [{ Name: "Issue - Business Ethics-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Business Ethics-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Carbon - Own Operations" ,Level4: [{ Name: "Issue - Carbon - Own Operations-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Carbon - Own Operations-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Carbon - Products and Services" ,Level4: [{ Name: "Issue - Carbon - Products and Services-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Carbon - Products and Services-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Community Relations" ,Level4: [{ Name: "Issue - Community Relations-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Community Relations-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Data Privacy and Security" ,Level4: [{ Name: "Issue - Data Privacy and Security-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Data Privacy and Security-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"E&S Impact of Products and Services" ,Level4: [{ Name: "Issue - E&S Impact of Products and Services-Risk Percentile-Universe", CriteriaEntityField:  "Issue - E&S Impact of Products and Services-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"ESG Integration - Financials" ,Level4: [{ Name: "Issue - ESG Integration - Financials-Risk Percentile-Universe", CriteriaEntityField:  "Issue - ESG Integration - Financials-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Emissions, Effluents and Waste" ,Level4: [{ Name: "Issue - Emissions, Effluents and Waste-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Emissions, Effluents and Waste-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Capital" ,Level4: [{ Name: "Issue - Human Capital-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Human Capital-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Rights" ,Level4: [{ Name: "Issue - Human Rights-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Human Rights-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Rights - Supply Chain" ,Level4: [{ Name: "Issue - Human Rights - Supply Chain-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Human Rights - Supply Chain-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Land Use and Biodiversity" ,Level4: [{ Name: "Issue - Land Use and Biodiversity-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Land Use and Biodiversity-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Land Use and Biodiversity - Supply Chain" ,Level4: [{ Name: "Issue - Land Use and Biodiversity - Supply Chain-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Land Use and Biodiversity - Supply Chain-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Occupational Health and Safety" ,Level4: [{ Name: "Issue - Occupational Health and Safety-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Occupational Health and Safety-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Product Governance" ,Level4: [{ Name: "Issue - Product Governance-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Product Governance-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resilience" ,Level4: [{ Name: "Issue - Resilience-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Resilience-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resource Use" ,Level4: [{ Name: "Issue - Resource Use-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Resource Use-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resource Use - Supply Chain" ,Level4: [{ Name: "Issue - Resource Use - Supply Chain-Risk Percentile-Universe", CriteriaEntityField:  "Issue - Resource Use - Supply Chain-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: false, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Access to Basic Services" ,Level4: [{ Name: "Issue - Access to Basic Services-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Access to Basic Services-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Bribery and Corruption" ,Level4: [{ Name: "Issue - Bribery and Corruption-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Bribery and Corruption-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Business Ethics" ,Level4: [{ Name: "Issue - Business Ethics-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Business Ethics-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Carbon - Own Operations" ,Level4: [{ Name: "Issue - Carbon - Own Operations-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Carbon - Own Operations-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Carbon - Products and Services" ,Level4: [{ Name: "Issue - Carbon - Products and Services-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Carbon - Products and Services-Risk Percentile-Industry  Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Community Relations" ,Level4: [{ Name: "Issue - Community Relations-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Community Relations-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Data Privacy and Security" ,Level4: [{ Name: "Issue - Data Privacy and Security-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Data Privacy and Security-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"E&S Impact of Products and Services" ,Level4: [{ Name: "Issue - E&S Impact of Products and Services-Risk Percentile-Industry", CriteriaEntityField:  "Issue - E&S Impact of Products and Services-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"ESG Integration - Financials" ,Level4: [{ Name: "Issue - ESG Integration - Financials-Risk Percentile-Industry", CriteriaEntityField:  "Issue - ESG Integration - Financials-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Emissions, Effluents and Waste" ,Level4: [{ Name: "Issue - Emissions, Effluents and Waste-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Emissions, Effluents and Waste-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Capital" ,Level4: [{ Name: "Issue - Human Capital-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Human Capital-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Rights" ,Level4: [{ Name: "Issue - Human Rights-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Human Rights-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Rights - Supply Chain" ,Level4: [{ Name: "Issue - Human Rights - Supply Chain-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Human Rights - Supply Chain-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Land Use and Biodiversity" ,Level4: [{ Name: "Issue - Land Use and Biodiversity-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Land Use and Biodiversity-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Land Use and Biodiversity - Supply Chain" ,Level4: [{ Name: "Issue - Land Use and Biodiversity - Supply Chain-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Land Use and Biodiversity - Supply Chain-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Occupational Health and Safety" ,Level4: [{ Name: "Issue - Occupational Health and Safety-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Occupational Health and Safety-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Product Governance" ,Level4: [{ Name: "Issue - Product Governance-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Product Governance-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resilience" ,Level4: [{ Name: "Issue - Resilience-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Resilience-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resource Use" ,Level4: [{ Name: "Issue - Resource Use-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Resource Use-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resource Use - Supply Chain" ,Level4: [{ Name: "Issue - Resource Use - Supply Chain-Risk Percentile-Industry", CriteriaEntityField:  "Issue - Resource Use - Supply Chain-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Access to Basic Services" ,Level4: [{ Name: "Issue - Access to Basic Services-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Access to Basic Services-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Bribery and Corruption" ,Level4: [{ Name: "Issue - Bribery and Corruption-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Bribery and Corruption-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Business Ethics" ,Level4: [{ Name: "Issue - Business Ethics-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Business Ethics-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Carbon - Own Operations" ,Level4: [{ Name: "Issue - Carbon - Own Operations-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Carbon - Own Operations-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Carbon - Products and Services" ,Level4: [{ Name: "Issue - Carbon - Products and Services-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Carbon - Products and Services-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Community Relations" ,Level4: [{ Name: "Issue - Community Relations-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Community Relations-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Data Privacy and Security" ,Level4: [{ Name: "Issue - Data Privacy and Security-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Data Privacy and Security-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"E&S Impact of Products and Services" ,Level4: [{ Name: "Issue - E&S Impact of Products and Services-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - E&S Impact of Products and Services-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"ESG Integration - Financials" ,Level4: [{ Name: "Issue - ESG Integration - Financials-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - ESG Integration - Financials-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Emissions, Effluents and Waste" ,Level4: [{ Name: "Issue - Emissions, Effluents and Waste-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Emissions, Effluents and Waste-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Capital" ,Level4: [{ Name: "Issue - Human Capital-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Human Capital-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Rights" ,Level4: [{ Name: "Issue - Human Rights-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Human Rights-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Human Rights - Supply Chain" ,Level4: [{ Name: "Issue - Human Rights - Supply Chain-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Human Rights - Supply Chain-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Land Use and Biodiversity" ,Level4: [{ Name: "Issue - Land Use and Biodiversity-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Land Use and Biodiversity-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Land Use and Biodiversity - Supply Chain" ,Level4: [{ Name: "Issue - Land Use and Biodiversity - Supply Chain-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Land Use and Biodiversity - Supply Chain-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Occupational Health and Safety" ,Level4: [{ Name: "Issue - Occupational Health and Safety-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Occupational Health and Safety-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Product Governance" ,Level4: [{ Name: "Issue - Product Governance-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Product Governance-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resilience" ,Level4: [{ Name: "Issue - Resilience-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Resilience-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resource Use" ,Level4: [{ Name: "Issue - Resource Use-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Resource Use-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Risk Percentile", Category:"Resource Use - Supply Chain" ,Level4: [{ Name: "Issue - Resource Use - Supply Chain-Risk Percentile-Subindustry", CriteriaEntityField:  "Issue - Resource Use - Supply Chain-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] }
    ]}
]};

var governance = 
{ Name: "ESG Risk Rating", Level2: [
    { Name: "Corporate Governance", Level3: [
		{ Name: "Corporate Governance-Risk Rank", Level4: [{ Name: "Corporate Governance-Risk Rank-Universe", CriteriaEntityField: "Issue - Corporate Governance-Risk Rank-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },	
		{ Name: "Corporate Governance-Risk Rank", Level4: [{ Name: "Corporate Governance-Risk Rank-Industry", CriteriaEntityField: "Issue - Corporate Governance-Risk Rank-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Corporate Governance-Risk Rank", Level4: [{ Name: "Corporate Governance-Risk Rank-Subindustry", CriteriaEntityField: "Issue - Corporate Governance-Risk Rank-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Corporate Governance-Risk Percentile", Level4: [{ Name: "Corporate Governance-Risk Percentile-Universe", CriteriaEntityField: "Issue - Corporate Governance-Risk Percentile-Universe", IsScreenable: true, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },	
		{ Name: "Corporate Governance-Risk Percentile", Level4: [{ Name: "Corporate Governance-Risk Percentile-Industry", CriteriaEntityField: "Issue - Corporate Governance-Risk Percentile-Industry Group", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] },
		{ Name: "Corporate Governance-Risk Percentile", Level4: [{ Name: "Corporate Governance-Risk Percentile-Subindustry", CriteriaEntityField: "Issue - Corporate Governance-Risk Percentile-Subindustry", IsScreenable: false, CriteriaType: 6, HasFullRangeChart: true, GetsValueFromParent: true }] }
    ]}
]};

db.getCollection('TemplateCriteria').update({Order:null}, {$set: {"Order": NumberInt(0)}},{multi:true});

function uuid() {
    function s4() {
        return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
    }
    return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
}

function HexToBase64(hex) {
    var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    var base64 = "";
    var group;
    for (var i = 0; i < 30; i += 6) {
        group = parseInt(hex.substr(i, 6), 16);
        base64 += base64Digits[(group >> 18) & 0x3f];
        base64 += base64Digits[(group >> 12) & 0x3f];
        base64 += base64Digits[(group >> 6) & 0x3f];
        base64 += base64Digits[group & 0x3f];
    }
    group = parseInt(hex.substr(30, 2), 16);
    base64 += base64Digits[(group >> 2) & 0x3f];
    base64 += base64Digits[(group << 4) & 0x3f];
    base64 += "==";
    return base64;
}

function NUUID(uuid) {
    var hex = uuid.replace(/[{}-]/g, ""); // remove extra characters
    var a = hex.substr(6, 2) + hex.substr(4, 2) + hex.substr(2, 2) + hex.substr(0, 2);
    var b = hex.substr(10, 2) + hex.substr(8, 2);
    var c = hex.substr(14, 2) + hex.substr(12, 2);
    var d = hex.substr(16, 16);
    hex = a + b + c + d;
    var base64 = HexToBase64(hex);
    return new BinData(3, base64);
}

function processLevel1overall(overall) {
    if (!db.CriteriaLevel1.findOne({ Name: overall.Name })) {
        db.CriteriaLevel1.insert({
            _id: NUUID(uuid()),
            Name: overall.Name,
            ShortName: 'RiskRatings',
            Order: NumberInt(15)
        });
    }

    var criteriaLevel1Id = db.CriteriaLevel1.findOne({ Name: overall.Name })._id;

    overall.Level2.forEach(function (overall, index) {
        processLevel2overall(criteriaLevel1Id, overall, index);
    });
}

function processLevel2overall(criteriaLevel1Id, overall, index) {
    if (!db.CriteriaLevel2.findOne({ Name: overall.Name })) {
        db.CriteriaLevel2.insert({
            _id: NUUID(uuid()),
            CriteriaLevel1Id: criteriaLevel1Id,
            UniverseFeature: NumberInt(18),
            Name: overall.Name,
            ShortName: 'RiskRatings',
            Order: (overall.Name == "Overall ESG Risk Rating"? NumberInt(0): overall.Name == "Corporate Governance" ? NumberInt(1):NumberInt(2))
        });
    }

    var criteriaLevel2Id = db.CriteriaLevel2.findOne({ Name: overall.Name })._id;
    var length = overall.Level3.length;

    overall.Level3.forEach(function (overall, index) {
        processLevel3overall(criteriaLevel2Id, overall, index+1);
    });
}

function processLevel3overall(criteriaLevel2Id, overall, index) {
    if (!db.CriteriaLevel3.findOne({ Name: overall.Name, CriteriaLevel2Id: criteriaLevel2Id })) 
    {
		var orderCompanyCategory = db.CriteriaLevel3.findOne({Name:"ESG Risk Category",CriteriaLevel2Id:criteriaLevel2Id}).Order;
		
        db.CriteriaLevel3.insert({
            _id: NUUID(uuid()),
            Name: overall.Name,
            ShortName: "",
            Order:(overall.Name =="Risk Rank"?NumberInt(orderCompanyCategory)+0.5:NumberInt(orderCompanyCategory)+0.75),
            CriteriaLevel2Id: criteriaLevel2Id,
            Category: "None",
			isActiveCategory:true
        });
    }

    var criteriaLevel3Id = db.CriteriaLevel3.findOne({ Name: overall.Name, CriteriaLevel2Id: criteriaLevel2Id })._id;
    
    overall.Level4.forEach(function (overall) {
        processLevel4overall(criteriaLevel2Id, criteriaLevel3Id, overall, index);
    });
}

function processLevel4overall(criteriaLevel2Id, criteriaLevel3Id, overall, index) {

		if (!db.TemplateCriteria.findOne({ Name: overall.Name, CriteriaLevel2Id: criteriaLevel2Id })) {
			db.TemplateCriteria.insert({
				_id: NUUID(uuid()),
				Name: overall.Name,
				CriteriaEntityField: overall.CriteriaEntityField,
				CriteriaType: NumberInt(overall.CriteriaType),
				CriteriaLevel2Id: criteriaLevel2Id,
				CriteriaLevel3Id: criteriaLevel3Id,
				IsScreenable: overall.IsScreenable,
				ResearchProducts: ["RiskRating", 
								   "CoreRiskRating"],
				HasFullRangeChart: overall.HasFullRangeChart==false? false : true,
				GetsValueFromParent: overall.GetsValueFromParent==false? false : true,
				Order: NumberInt(index)
			});
		}
}
	//mei
	
function processLevel1mei(mei) {
    if (!db.CriteriaLevel1.findOne({ Name: mei.Name })) {
        db.CriteriaLevel1.insert({
            _id: NUUID(uuid()),
            Name: mei.Name,
            ShortName: 'RiskRatings',
            Order: NumberInt(15)
        });
    }

    var criteriaLevel1Id = db.CriteriaLevel1.findOne({ Name: mei.Name })._id;

    mei.Level2.forEach(function (mei, index) {
        processLevel2mei(criteriaLevel1Id, mei, index);
    });
}

function processLevel2mei(criteriaLevel1Id, mei, index) {
    if (!db.CriteriaLevel2.findOne({ Name: mei.Name })) {
        db.CriteriaLevel2.insert({
            _id: NUUID(uuid()),
            CriteriaLevel1Id: criteriaLevel1Id,
            UniverseFeature: NumberInt(18),
            Name: mei.Name,
            ShortName: 'RiskRatings',
            Order: (mei.Name == "Overall ESG Risk Rating"? NumberInt(0): mei.Name == "Corporate Governance" ? NumberInt(1):NumberInt(2))
        });
    }

    var criteriaLevel2Id = db.CriteriaLevel2.findOne({ Name: mei.Name })._id;
    var length = mei.Level3.length;

    mei.Level3.forEach(function (mei, index) {
        processLevel3mei(criteriaLevel2Id, mei, index+1);
    });
}

function processLevel3mei(criteriaLevel2Id, mei, index) {
    if (!db.CriteriaLevel3.findOne({ Name: mei.Name, CriteriaLevel2Id: criteriaLevel2Id, Category:mei.Category })) 
    {
		var orderCompanyCategory = db.CriteriaLevel3.findOne({Name:"Risk Category",CriteriaLevel2Id:criteriaLevel2Id,Category:mei.Category}).Order;
		//print(NumberInt(orderCompanyCategory));
		
        db.CriteriaLevel3.insert({
            _id: NUUID(uuid()),
            Name: mei.Name,
            ShortName: mei.Name,
            Order: (mei.Name =="Risk Rank"?NumberInt(orderCompanyCategory)+0.5:NumberInt(orderCompanyCategory)+0.75),
            CriteriaLevel2Id: criteriaLevel2Id,
            Category: mei.Category,
			isActiveCategory:true
        });
    }

    var criteriaLevel3Id = db.CriteriaLevel3.findOne({ Name: mei.Name, CriteriaLevel2Id: criteriaLevel2Id, Category: mei.Category })._id;
    
    mei.Level4.forEach(function (mei) {
        processLevel4mei(criteriaLevel2Id, criteriaLevel3Id, mei, index);
    });
}

function processLevel4mei(criteriaLevel2Id, criteriaLevel3Id, mei, index) {

		if (!db.TemplateCriteria.findOne({ Name: mei.Name, CriteriaLevel2Id: criteriaLevel2Id })) {
			db.TemplateCriteria.insert({
				_id: NUUID(uuid()),
				Name: mei.Name,
				CriteriaEntityField: mei.CriteriaEntityField,
				CriteriaType: NumberInt(mei.CriteriaType),
				CriteriaLevel2Id: criteriaLevel2Id,
				CriteriaLevel3Id: criteriaLevel3Id,
				IsScreenable: mei.IsScreenable,
				ResearchProducts: ["RiskRating", 
								   "CoreRiskRating"],
				HasFullRangeChart: mei.HasFullRangeChart==false? false : true,
				GetsValueFromParent: mei.GetsValueFromParent==false? false : true,
				Order: NumberInt(index)
			});
		}	
}
	//governance
	
function processLevel1governance(governance) {
    if (!db.CriteriaLevel1.findOne({ Name: governance.Name })) {
        db.CriteriaLevel1.insert({
            _id: NUUID(uuid()),
            Name: governance.Name,
            ShortName: 'RiskRatings',
            Order: NumberInt(15)
        });
    }

    var criteriaLevel1Id = db.CriteriaLevel1.findOne({ Name: governance.Name })._id;

    governance.Level2.forEach(function (governance, index) {
        processLevel2governance(criteriaLevel1Id, governance, index);
    });
}

function processLevel2governance(criteriaLevel1Id, governance, index) {
    if (!db.CriteriaLevel2.findOne({ Name: governance.Name })) {
        db.CriteriaLevel2.insert({
            _id: NUUID(uuid()),
            CriteriaLevel1Id: criteriaLevel1Id,
            UniverseFeature: NumberInt(18),
            Name: governance.Name,
            ShortName: 'RiskRatings',
            Order: (governance.Name == "Overall ESG Risk Rating"? NumberInt(0): governance.Name == "Corporate Governance" ? NumberInt(1):NumberInt(2))
        });
    }

    var criteriaLevel2Id = db.CriteriaLevel2.findOne({ Name: governance.Name })._id;
    var length = governance.Level3.length;

    governance.Level3.forEach(function (governance, index) {
        processLevel3governance(criteriaLevel2Id, governance, index+1);
    });
}

function processLevel3governance(criteriaLevel2Id, governance, index) {
    if (!db.CriteriaLevel3.findOne({ Name: governance.Name, CriteriaLevel2Id: criteriaLevel2Id })) 
    {
		var orderCompanyCategory = db.CriteriaLevel3.findOne({Name:/Risk Category/,CriteriaLevel2Id:criteriaLevel2Id}).Order;
		
        db.CriteriaLevel3.insert({
            _id: NUUID(uuid()),
            Name: governance.Name,
            ShortName: governance.Name,
            Order: (governance.Name =="Risk Rank"?NumberInt(orderCompanyCategory)+0.5:NumberInt(orderCompanyCategory)+0.75),
            CriteriaLevel2Id: criteriaLevel2Id,
            Category: "None",
			isActiveCategory:true
        });
    }
	
    var criteriaLevel3Id = db.CriteriaLevel3.findOne({ Name: governance.Name, CriteriaLevel2Id: criteriaLevel2Id })._id;
    
    governance.Level4.forEach(function (governance) {
        processLevel4governance(criteriaLevel2Id, criteriaLevel3Id, governance, index);
    });
}

function processLevel4governance(criteriaLevel2Id, criteriaLevel3Id, governance, index) {

		if (!db.TemplateCriteria.findOne({ Name: governance.Name, CriteriaLevel2Id: criteriaLevel2Id })) {
			db.TemplateCriteria.insert({
				_id: NUUID(uuid()),
				Name: governance.Name,
				CriteriaEntityField: governance.CriteriaEntityField,
				CriteriaType: NumberInt(governance.CriteriaType),
				CriteriaLevel2Id: criteriaLevel2Id,
				CriteriaLevel3Id: criteriaLevel3Id,
				IsScreenable: governance.IsScreenable,
				ResearchProducts: ["RiskRating", 
								   "CoreRiskRating"],
				HasFullRangeChart: governance.HasFullRangeChart==false? false : true,
				GetsValueFromParent: governance.GetsValueFromParent==false? false : true,
				Order: NumberInt(index)
			});
}}

processLevel1overall(overall);   
processLevel1mei(mei);   
processLevel1governance(governance); 

var idx=0;

//Change Order in CriteriaLevel3 for ControversyIndicators
var criteriaLevel2IdControversy = db.CriteriaLevel2.findOne({Name:"Controversy Indicators",UniverseFeature:8})._id;

var criterialevel3controversye = db.CriteriaLevel3.find({CriteriaLevel2Id:criteriaLevel2IdControversy, Name:{$regex: /^E/}}).sort({Name:1});

criterialevel3controversye.forEach(function (crt)
{
	db.getCollection('CriteriaLevel3').update(
                {_id: crt._id}, {$set:{Order:NumberInt(idx+1)}},{multi:false})
                idx++;
});

var criterialevel3controversys = db.CriteriaLevel3.find({CriteriaLevel2Id:criteriaLevel2IdControversy, Name:{$regex: /^S/}}).sort({Name:1});

criterialevel3controversys.forEach(function (crt)
{
	db.getCollection('CriteriaLevel3').update(
                {_id: crt._id}, {$set:{Order:NumberInt(idx+1)}},{multi:false})
                idx++;
});

var criterialevel3controversyg = db.CriteriaLevel3.find({CriteriaLevel2Id:criteriaLevel2IdControversy, Name:{$regex: /^G/}}).sort({Name:1});

criterialevel3controversyg.forEach(function (crt)
{
	db.getCollection('CriteriaLevel3').update(
                {_id: crt._id}, {$set:{Order:NumberInt(idx+1)}},{multi:false})
                idx++;
});

db.TemplateCriteria.aggregate([
  { "$lookup": {
    "localField": "CriteriaLevel3Id",
    "from": "CriteriaLevel3",
    "foreignField": "_id",
    "as": "orderinfo"
  } },
  { "$unwind": "$orderinfo" },
  { "$project": {
    "_id": 1,
    "orderinfo.Order": 1
  } }
]).forEach(function(item){
  db.TemplateCriteria.update({_id: item._id},{ $set: { "Order": item.orderinfo.Order }}, { multi: true })    
});

idx=0;

//update order for Risk Rating Environment, Social and Governance Indicators, 
var categories = 	{
						Category:[
							{CategoryName: "Preparedness"},
							{CategoryName: "Disclosure"},
							{CategoryName: "Quantitative Performance"}]
					}

//Environment
var criteriaLevel2IdEnvironment = db.CriteriaLevel2.findOne({Name:"Environment Indicators",UniverseFeature:5})._id;

categories.Category.forEach(function (categories)
{
	var criterialevel3items = db.getCollection('CriteriaLevel3').find({CriteriaLevel2Id:criteriaLevel2IdEnvironment, Category:categories.CategoryName}).sort({Name:1})
	criterialevel3items.forEach(function (criterialevel3items)
	{
		db.getCollection('CriteriaLevel3').update(
                {_id: criterialevel3items._id}, {$set:{Order:NumberInt(idx+1)}},{multi:false})
                idx++;
	});
});

idx=0;

//Social
var criteriaLevel2IdSocial = db.CriteriaLevel2.findOne({Name:"Social Indicators",UniverseFeature:6})._id;

categories.Category.forEach(function (categories)
{
	var criterialevel3items = db.getCollection('CriteriaLevel3').find({CriteriaLevel2Id:criteriaLevel2IdSocial, Category:categories.CategoryName}).sort({Name:1})
	criterialevel3items.forEach(function (criterialevel3items)
	{
		db.getCollection('CriteriaLevel3').update(
                {_id: criterialevel3items._id}, {$set:{Order:NumberInt(idx+1)}},{multi:false})
                idx++;
	});
});

idx=0;

//Governance
var criteriaLevel2IdGovernance = db.CriteriaLevel2.findOne({Name:"Governance Indicators",UniverseFeature:7})._id;

categories.Category.forEach(function (categories)
{
	var criterialevel3items = db.getCollection('CriteriaLevel3').find({CriteriaLevel2Id:criteriaLevel2IdGovernance, Category:categories.CategoryName}).sort({Name:1})
	criterialevel3items.forEach(function (criterialevel3items)
	{
		db.getCollection('CriteriaLevel3').update(
                {_id: criterialevel3items._id}, {$set:{Order:NumberInt(idx+1)}},{multi:false})
                idx++;
	});
});			

////update order for mei
var idCriteriaLevel2 = db.getCollection('CriteriaLevel2').findOne({Name:"Material E&S Issues",ShortName:"RiskRatings"})._id;

var selnoidio= db.getCollection('CriteriaLevel3').find({$and:[{CriteriaLevel2Id:idCriteriaLevel2}, 
			   {Category:{$not: /Idiosyncratic/}}]}).sort({Category:1 , Order:1})

idx=0;

function processNoIdio(selnoidio, index) {
        db.getCollection('CriteriaLevel3').update(
        {_id: selnoidio._id}, {$set:{Order:NumberInt(index)}},{multi:false});
}

selnoidio.forEach(function (selnoidio) {
        idx = idx+1;
        processNoIdio(selnoidio, idx);
    });
					
var selidio =  db.getCollection('CriteriaLevel3').find({$and:[{CriteriaLevel2Id:idCriteriaLevel2}, 
			   {Category:/Idiosyncratic/}]}).sort({Category:1 , Order:1});
	
function processIdio(selidio, index) {
        db.getCollection('CriteriaLevel3').update(
        {_id: selidio._id}, {$set:{Order:NumberInt(index)}},{multi:false});
		db.getCollection('TemplateCriteria').update(
        {_id: selidio._id}, {$set:{Order:NumberInt(index)}},{multi:false});
}

selidio.forEach(function (selidio) {
        idx = idx+1;
        processIdio(selidio, idx);
    });

/////update order for overall
var idCriteriaLevel2 = db.getCollection('CriteriaLevel2').findOne({Name:"Overall ESG Risk Rating",ShortName:"RiskRatings"})._id;

var seloverall= db.getCollection('CriteriaLevel3').find({CriteriaLevel2Id:idCriteriaLevel2}).sort({Order:1})

idx=0;

function processoverall(seloverall, index) {
        db.getCollection('CriteriaLevel3').update(
        {_id: seloverall._id}, {$set:{Order:NumberInt(index)}},{multi:false});
		db.getCollection('TemplateCriteria').update(
        {_id: seloverall._id}, {$set:{Order:NumberInt(index)}},{multi:false});
}

seloverall.forEach(function (seloverall) {
        idx = idx+1;
        processoverall(seloverall, idx);
    });

/////update order for governance
var idCriteriaLevel2 = db.getCollection('CriteriaLevel2').findOne({Name:"Corporate Governance",ShortName:"RiskRatings"})._id;

var selgovernance= db.getCollection('CriteriaLevel3').find({CriteriaLevel2Id:idCriteriaLevel2}).sort({Order:1})

idx=0;

function processoverall(selgovernance, index) {
        db.getCollection('CriteriaLevel3').update(
        {_id: selgovernance._id}, {$set:{Order:NumberInt(index)}},{multi:false});
		db.getCollection('TemplateCriteria').update(
        {_id: selgovernance._id}, {$set:{Order:NumberInt(index)}},{multi:false});
}

selgovernance.forEach(function (selgovernance) {
        idx = idx+1;
        processoverall(selgovernance, idx);
    });

//update universe, industry and subindustry order
var tpl= db.TemplateCriteria.find( {$or:[{Name:{$regex: "-Universe$"}},{Name:{$regex: "-Industry$"}},{Name:{$regex: "-Subindustry$"}}]}).sort({CriteriaLevel2Id:1, CriteriaLevel3Id:1});


tpl.forEach(function (tpl)
{
    //print(tpl);
    var universeorder = db.getCollection('TemplateCriteria').findOne({CriteriaLevel3Id: tpl.CriteriaLevel3Id, Name:{$regex: "Universe$"}}).Order;

    db.getCollection('TemplateCriteria').update({_id: tpl._id},{"$set":{Order:(tpl.Name.endsWith("Universe")?NumberInt(universeorder):(tpl.Name.endsWith("Industry")?NumberInt(universeorder+1):NumberInt(universeorder+2)))}},{multi:false})
    });
	
//update order for Risk Rating Environment, Social and Governance Indicators TemplateCriteria

//Environment
var criteriaLevel2IdEnvironment = db.CriteriaLevel2.findOne({Name:"Environment Indicators",UniverseFeature:5})._id;

var tplitemsenv = db.getCollection('TemplateCriteria').find({CriteriaLevel2Id:criteriaLevel2IdEnvironment}).sort({Order:1})
tplitemsenv.forEach(function (tplitemsenv)
	{
		db.getCollection('TemplateCriteria').update(
                {_id: tplitemsenv._id}, {$set:{Order:(tplitemsenv.Name.endsWith("Weight")?NumberInt(tplitemsenv.Order):(tplitemsenv.Name.endsWith("Raw Score")?NumberInt(tplitemsenv.Order+1):(tplitemsenv.Name.endsWith("Answer Category")?NumberInt(tplitemsenv.Order+2):NumberInt(tplitemsenv.Order+3))))}},{multi:false})
	});

//Social
var criteriaLevel2IdSocial = db.CriteriaLevel2.findOne({Name:"Social Indicators",UniverseFeature:6})._id;

var tplitemssoc = db.getCollection('TemplateCriteria').find({CriteriaLevel2Id:criteriaLevel2IdSocial}).sort({Order:1})
tplitemssoc.forEach(function (tplitemssoc)
	{
		db.getCollection('TemplateCriteria').update(
                {_id: tplitemssoc._id}, {$set:{Order:(tplitemssoc.Name.endsWith("Weight")?NumberInt(tplitemssoc.Order):(tplitemssoc.Name.endsWith("Raw Score")?NumberInt(tplitemssoc.Order+1):(tplitemssoc.Name.endsWith("Answer Category")?NumberInt(tplitemssoc.Order+2):NumberInt(tplitemsenv.Order+3))))}},{multi:false})
	});

//Governance
var criteriaLevel2IdGovernance = db.CriteriaLevel2.findOne({Name:"Governance Indicators",UniverseFeature:7})._id;

var tplitemsgov = db.getCollection('TemplateCriteria').find({CriteriaLevel2Id:criteriaLevel2IdGovernance}).sort({Order:1})
tplitemsgov.forEach(function (tplitemsgov)
	{
		db.getCollection('TemplateCriteria').update(
                {_id: tplitemsgov._id}, {$set:{Order:(tplitemsgov.Name.endsWith("Weight")?NumberInt(tplitemsgov.Order):(tplitemsgov.Name.endsWith("Raw Score")?NumberInt(tplitemsgov.Order+1):(tplitemsgov.Name.endsWith("Answer Category")?NumberInt(tplitemsgov.Order+2):NumberInt(tplitemsgov.Order+3))))}},{multi:false})
	});

//Update order for ControversyIndicators
var criteriaLevel2IdControversy = db.CriteriaLevel2.findOne({Name:"Controversy Indicators",UniverseFeature:8})._id;

var tplitemscontroversy = db.getCollection('TemplateCriteria').find({CriteriaLevel2Id:criteriaLevel2IdControversy}).sort({Order:1})
tplitemscontroversy.forEach(function (tplitemscontroversy)
	{
		db.getCollection('TemplateCriteria').update(
                {_id: tplitemscontroversy._id}, {$set:{Order:(tplitemscontroversy.Name.endsWith("Answer Category")?NumberInt(tplitemscontroversy.Order):(tplitemscontroversy.Name.endsWith("Assessment")?NumberInt(tplitemscontroversy.Order+1):(tplitemscontroversy.Name.endsWith("Raw Score")?NumberInt(tplitemscontroversy.Order+2):(tplitemscontroversy.Name.endsWith("Weighted Score")?NumberInt(tplitemscontroversy.Order+3):
				(tplitemscontroversy.Name.endsWith("Weight")?NumberInt(tplitemscontroversy.Order+4):NumberInt(tplitemscontroversy.Order+5))))))}},{multi:false})
	});
//Update order for Events
var criteriaLevel2IdEvents = db.CriteriaLevel2.findOne({Name:"Events",UniverseFeature:8})._id;

var tplitemsevents = db.getCollection('TemplateCriteria').find({CriteriaLevel2Id:criteriaLevel2IdEvents}).sort({Order:1})
tplitemsevents.forEach(function (tplitemsevents)
	{
		db.getCollection('TemplateCriteria').update(
                {_id: tplitemsevents._id}, {$set:{Order:(tplitemsevents.Name.endsWith("Answer Category")?NumberInt(tplitemsevents.Order):NumberInt(tplitemsevents.Order+1))}},{multi:false})
	});	
//Update order for Incidents
var criteriaLevel2IdIncidents = db.CriteriaLevel2.findOne({Name:"Incidents",UniverseFeature:8})._id;

var tplitemsincidents = db.getCollection('TemplateCriteria').find({CriteriaLevel2Id:criteriaLevel2IdIncidents}).sort({Order:1})
tplitemsincidents.forEach(function (tplitemsincidents)
	{
		db.getCollection('TemplateCriteria').update(
                {_id: tplitemsincidents._id}, {$set:{Order:(tplitemsincidents.Name.endsWith("Risk Answer Category")?NumberInt(tplitemsincidents.Order):(tplitemsincidents.Name.endsWith("Impact Answer Category")?NumberInt(tplitemsincidents.Order+1):NumberInt(tplitemsincidents.Order+2)))}},{multi:false})
	});	
	
//Update order for Corporate Governance Issues
var criteriaLevel2IdIssues = db.CriteriaLevel2.findOne({Name:"Corporate Governance Issues",UniverseFeature:15})._id;

var tplitemsissues = db.getCollection('TemplateCriteria').find({CriteriaLevel2Id:criteriaLevel2IdIssues}).sort({Order:1})
tplitemsissues.forEach(function (tplitemsissues)
	{
		db.getCollection('TemplateCriteria').update(
                {_id: tplitemsissues._id}, {$set:{Order:(tplitemsissues.Name.endsWith("Integrity-Score")?NumberInt(tplitemsissues.Order):(tplitemsissues.Name.endsWith("Integrity-Weighted Score")?NumberInt(tplitemsissues.Order+1):NumberInt(tplitemsissues.Order+2)))}},{multi:false})
	});	

//Update is screenable Subindustry
db.TemplateCriteria.update({Name:/Risk Rank-Universe/},{$set: {IsScreenable:false, HasFullRangeChart:true}},{multi:true})
db.TemplateCriteria.update({Name:/Risk Rank-Subindustry/},{$set: {IsScreenable:true, HasFullRangeChart:false}},{multi:true})

db.TemplateCriteria.update({Name:/Risk Percentile-Universe/},{$set: {IsScreenable:false, HasFullRangeChart:true}},{multi:true})
db.TemplateCriteria.update({Name:/Risk Percentile-Subindustry/},{$set: {IsScreenable:true, HasFullRangeChart:false}},{multi:true})
